package com.unionpay.mpds.model;

// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Institude entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_INSTITUDE", uniqueConstraints = @UniqueConstraint(columnNames = "INST_CODE"))
public class Institude implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 5148826710564677088L;
	private String instNo;
	private String instCode;
	private String instName;
	private String instLevel;
	private String instStatus;
	private String instNoP;
	private String instEmial;
	private String instFax;
	private String instTel;
	private String instManager;
	private String instZip;
	private String instAddress;

	// Constructors

	/** default constructor */
	public Institude() {
	}

	/** minimal constructor */
	public Institude(String instNo, String instCode, String instName,
			String instLevel, String instStatus, String instNoP) {
		this.instNo = instNo;
		this.instCode = instCode;
		this.instName = instName;
		this.instLevel = instLevel;
		this.instStatus = instStatus;
		this.instNoP = instNoP;
	}

	/** full constructor */
	public Institude(String instNo, String instCode, String instName,
			String instLevel, String instStatus, String instNoP,
			String instEmial, String instFax, String instTel,
			String instManager, String instZip, String instAddress) {
		this.instNo = instNo;
		this.instCode = instCode;
		this.instName = instName;
		this.instLevel = instLevel;
		this.instStatus = instStatus;
		this.instNoP = instNoP;
		this.instEmial = instEmial;
		this.instFax = instFax;
		this.instTel = instTel;
		this.instManager = instManager;
		this.instZip = instZip;
		this.instAddress = instAddress;
	}

	// Property accessors

	@Column(name = "INST_NO", nullable = false, length = 15)
	public String getInstNo() {
		return this.instNo;
	}

	public void setInstNo(String instNo) {
		this.instNo = instNo;
	}

	@Id
	@Column(name = "INST_CODE", unique = true, nullable = false, length = 8)
	public String getInstCode() {
		return this.instCode;
	}

	public void setInstCode(String instCode) {
		this.instCode = instCode;
	}

	@Column(name = "INST_NAME", nullable = false, length = 40)
	public String getInstName() {
		return this.instName;
	}

	public void setInstName(String instName) {
		this.instName = instName;
	}

	@Column(name = "INST_LEVEL", nullable = false, length = 1)
	public String getInstLevel() {
		return this.instLevel;
	}

	public void setInstLevel(String instLevel) {
		this.instLevel = instLevel;
	}

	@Column(name = "INST_STATUS", nullable = false, length = 1)
	public String getInstStatus() {
		return this.instStatus;
	}

	public void setInstStatus(String instStatus) {
		this.instStatus = instStatus;
	}

	@Column(name = "INST_NO_P", nullable = false, length = 15)
	public String getInstNoP() {
		return this.instNoP;
	}

	public void setInstNoP(String instNoP) {
		this.instNoP = instNoP;
	}

	@Column(name = "INST_EMIAL", length = 40)
	public String getInstEmial() {
		return this.instEmial;
	}

	public void setInstEmial(String instEmial) {
		this.instEmial = instEmial;
	}

	@Column(name = "INST_FAX", length = 15)
	public String getInstFax() {
		return this.instFax;
	}

	public void setInstFax(String instFax) {
		this.instFax = instFax;
	}

	@Column(name = "INST_TEL", length = 15)
	public String getInstTel() {
		return this.instTel;
	}

	public void setInstTel(String instTel) {
		this.instTel = instTel;
	}

	@Column(name = "INST_MANAGER", length = 20)
	public String getInstManager() {
		return this.instManager;
	}

	public void setInstManager(String instManager) {
		this.instManager = instManager;
	}

	@Column(name = "INST_ZIP", length = 6)
	public String getInstZip() {
		return this.instZip;
	}

	public void setInstZip(String instZip) {
		this.instZip = instZip;
	}

	@Column(name = "INST_ADDRESS", length = 80)
	public String getInstAddress() {
		return this.instAddress;
	}

	public void setInstAddress(String instAddress) {
		this.instAddress = instAddress;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof Institude))
			return false;
		Institude castOther = (Institude) other;

		return ((this.getInstNo() == castOther.getInstNo()) || (this
				.getInstNo() != null && castOther.getInstNo() != null && this
				.getInstNo().equals(castOther.getInstNo())))
				&& ((this.getInstCode() == castOther.getInstCode()) || (this
						.getInstCode() != null
						&& castOther.getInstCode() != null && this
						.getInstCode().equals(castOther.getInstCode())))
				&& ((this.getInstName() == castOther.getInstName()) || (this
						.getInstName() != null
						&& castOther.getInstName() != null && this
						.getInstName().equals(castOther.getInstName())))
				&& ((this.getInstLevel() == castOther.getInstLevel()) || (this
						.getInstLevel() != null
						&& castOther.getInstLevel() != null && this
						.getInstLevel().equals(castOther.getInstLevel())))
				&& ((this.getInstStatus() == castOther.getInstStatus()) || (this
						.getInstStatus() != null
						&& castOther.getInstStatus() != null && this
						.getInstStatus().equals(castOther.getInstStatus())))
				&& ((this.getInstNoP() == castOther.getInstNoP()) || (this
						.getInstNoP() != null && castOther.getInstNoP() != null && this
						.getInstNoP().equals(castOther.getInstNoP())))
				&& ((this.getInstEmial() == castOther.getInstEmial()) || (this
						.getInstEmial() != null
						&& castOther.getInstEmial() != null && this
						.getInstEmial().equals(castOther.getInstEmial())))
				&& ((this.getInstFax() == castOther.getInstFax()) || (this
						.getInstFax() != null && castOther.getInstFax() != null && this
						.getInstFax().equals(castOther.getInstFax())))
				&& ((this.getInstTel() == castOther.getInstTel()) || (this
						.getInstTel() != null && castOther.getInstTel() != null && this
						.getInstTel().equals(castOther.getInstTel())))
				&& ((this.getInstManager() == castOther.getInstManager()) || (this
						.getInstManager() != null
						&& castOther.getInstManager() != null && this
						.getInstManager().equals(castOther.getInstManager())))
				&& ((this.getInstZip() == castOther.getInstZip()) || (this
						.getInstZip() != null && castOther.getInstZip() != null && this
						.getInstZip().equals(castOther.getInstZip())))
				&& ((this.getInstAddress() == castOther.getInstAddress()) || (this
						.getInstAddress() != null
						&& castOther.getInstAddress() != null && this
						.getInstAddress().equals(castOther.getInstAddress())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getInstNo() == null ? 0 : this.getInstNo().hashCode());
		result = 37 * result
				+ (getInstCode() == null ? 0 : this.getInstCode().hashCode());
		result = 37 * result
				+ (getInstName() == null ? 0 : this.getInstName().hashCode());
		result = 37 * result
				+ (getInstLevel() == null ? 0 : this.getInstLevel().hashCode());
		result = 37
				* result
				+ (getInstStatus() == null ? 0 : this.getInstStatus()
						.hashCode());
		result = 37 * result
				+ (getInstNoP() == null ? 0 : this.getInstNoP().hashCode());
		result = 37 * result
				+ (getInstEmial() == null ? 0 : this.getInstEmial().hashCode());
		result = 37 * result
				+ (getInstFax() == null ? 0 : this.getInstFax().hashCode());
		result = 37 * result
				+ (getInstTel() == null ? 0 : this.getInstTel().hashCode());
		result = 37
				* result
				+ (getInstManager() == null ? 0 : this.getInstManager()
						.hashCode());
		result = 37 * result
				+ (getInstZip() == null ? 0 : this.getInstZip().hashCode());
		result = 37
				* result
				+ (getInstAddress() == null ? 0 : this.getInstAddress()
						.hashCode());
		return result;
	}

}